local pch_cte = pch_cte or {}

-- pch_cte.appInfo = {
-- 	appId = "300008713232",
-- 	appKey = "6C20462E58C13D91BF463E98317A4F9D"
-- }

pch_cte.itemInfo = {
    ChangWanLiBao = { paycode = "078EB1A912606FEAE0530100007FB0EF"},
    TiLiBuMan = 	{ paycode = "078EB1A912616FEAE0530100007FB0EF"},
    FuHuo = 		{ paycode = "078EB1A912626FEAE0530100007FB0EF"},
    JinBi_680 = 	{ paycode = "078EB1A912636FEAE0530100007FB0EF"},
    JinBi_1680 = 	{ paycode = "078EB1A912646FEAE0530100007FB0EF"},
    JinBi_3980 = 	{ paycode = "078EB1A912656FEAE0530100007FB0EF"},
    FenJi_10 = 		{ paycode = "078EB1A912666FEAE0530100007FB0EF"},
    YuHeng_10 = 	{ paycode = "078EB1A912676FEAE0530100007FB0EF"},
}

local luaj = require "luaj"

function pch_cte:init_callJava()
	-- local args = {}
	-- local sigs = "()V"
	-- local className = "org/cocos2dx/lua/AppActivity"
	-- local ok = luaj.callStaticMethod(className, "s_cteInit_fromLua", args, sigs)
	-- if not ok then
	-- 	d_print("pch_cte init_callJava error")
	-- end
end

function pch_cte:order_callJava( item )
	-- body
	if self.itemInfo[item.key] then
		
        local paycode = self.itemInfo[item.key].paycode

		local args = {paycode,item.desc,item.price}
		local sigs = "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V"
		local className = "org/cocos2dx/lua/AppActivity"
		local ok = luaj.callStaticMethod(className, "s_cteOrder_fromLua", args, sigs)

		if not ok then
			d_print("pch_cte order_callJava error")
		end

	else
        assert(false, "cte order item unexist:"..item.key)
	end
		
end


return pch_cte
